package com.cat.util;

import sun.plugin.com.TypeConverter;

import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Properties;

/**
 * @author HYC kobe524348@gmail.com
 * @program HYC_CatRecruit
 * @description a factory to offer dao instance
 * @date 2019-04-05 11:40
 */
public class DaoFactory {
    private DaoFactory instance = new DaoFactory();

    private DaoFactory() {

    }

    public DaoFactory getInstance() {
        return this.instance;
    }

    public Object getDaoInstance(String className) throws ExceptionInInitializerError {
//        Properties prop = new Properties("/daoprop");
//        InputStream inputStream = new FileInputStream("")
//        prop.load();
//        String clazz = prop.getProperty(className);
//        try {
//            return Class.forName(clazz).newInstance();
//        } catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
//            throw new ExceptionInInitializerError(e);
//        }
        return null;
    }


}

